<?php


namespace app\model;

use think\Model;

class Department extends Model
{
    public function users()
    {
        return $this->belongsToMany(
            User::class,
            DepartmentUser::class,
            'department_id',
            'id'
        );
    }
}